<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"
	xmlns:pm="http://primefaces.org/mobile" contentType="text/html" renderKitId="PRIMEFACES_MOBILE">
	<pm:page title="Summary">
		<pm:view id="main">
			<pm:header title="Order Sheet" swatch="b">
				<f:facet name="left">
					<p:commandLink value="Back" icon="back" action="#{cWaiterAction.goBack()}" />
				</f:facet>
				<f:facet name="right">
					<p:commandLink value="Logout" icon="back" action="#{cWaiterAction.logout()}" />
				</f:facet>
			</pm:header>
			<pm:content>
				<h:form id="myForm">
					<h:outputLabel value="Total: " for="total" />
					<h:outputText value="#{cWaiterForm.total}" id="total" />
					<p:dataList var="hesap" value="#{cWaiterForm.summaryBeans}" type="inset">
						<f:facet name="header">
							<h:outputText value="Summary" />
						</f:facet>
						<h:panelGrid columns="3">
							<p:selectBooleanCheckbox value="#{hesap.selected}">
								<p:ajax event="change" listener="#{cWaiterAction.reTotal()}" update=":myForm" />
							</p:selectBooleanCheckbox>
							<h:outputText value="#{hesap.foodName}" />
							<h:outputText value="#{hesap.total}" />
						</h:panelGrid>
					</p:dataList>
					<p:commandButton value="Get Money" action="#{cWaiterAction.getMoney()}" update="myForm" />
				</h:form>
			</pm:content>
		</pm:view>
	</pm:page>
</f:view>